package Controller;

import Service.ResourceCategoryService;
import domain.ResourceCategory;
import domain.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ResourceCategory")
public class ResourceCategoryController {

    @Autowired
    private ResourceCategoryService resourceCategoryService;

    /*
            资源分类表的查询
     */
    @RequestMapping("/findAllResourceCategory")
    public ResponseResult findAllResourceCategory(){

        List<ResourceCategory> resourceCategory = resourceCategoryService.findAllResourceCategory();

        return new ResponseResult(true,200,"资源列表查询成功",resourceCategory);
    }
}
